package com.jy.datapipeline.importserver.controller;

import com.jy.datapipeline.common.vo.ReturnVo;
import com.jy.datapipeline.importserver.service.ImportTaskLogService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @类名 ImportExecuteController
 * @描述 TODO
 * @作者 白条君
 * @创建日期 2023/4/19 17:54
 * @版本 1.0
 */
@RestController
@RequestMapping("/log")
public class ImportTaskLogController {

    private final ImportTaskLogService importTaskLogService;

    public ImportTaskLogController(ImportTaskLogService importTaskLogService) {
        this.importTaskLogService = importTaskLogService;
    }

    @GetMapping("/query-by-page")
    public ReturnVo queryByPage(@RequestParam(defaultValue = "1") Long pageNo, @RequestParam(defaultValue = "5") Long pageSize
            , @RequestParam String subtaskId, String taskStatus) {
        return importTaskLogService.queryByPage(pageNo, pageSize, subtaskId, taskStatus);
    }
}
